package cn.edu.scau.cmi.liweihang.composite.consist;

import java.util.HashSet;
import java.util.Set;

import cn.edu.scau.cmi.liweihang.composite.consist.Component;

public class Team implements Component{

	private String name;
	
	private Team team;
	
		
	private Set<Component> children = new HashSet<Component>();

	
	public Component addChild(Component child){
		children.add(child);
		return this;
	}
	
	public Component removeChild(Component child){
		children.remove(child);
		return this;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Set<Component> getChildren() {
		return children;
	}

	public void setChildren(Set<Component> children) {
		this.children = children;
	}

	@Override
	public String getName() {
		// TODO Auto-generated method stub
		return name;
	}

	@Override
	public Team getTeam() {
		// TODO Auto-generated method stub
		return team;
	}

	@Override
	public void setTeam(Component team) {
		// TODO Auto-generated method stub
		this.team=(Team) team;
	}
	


}
